﻿using System;

namespace BizElements.Core.ProviderComponents
{
    /// <summary>Renders DB paremeters when used inside statementes..</summary>
    public interface IParameterRenderer
    {
        /// <summary>Renders parameter name.</summary>
        /// <param name="parameter">SQL command parameter.</param>
        /// <returns>Parameter name.</returns>
        string RenderParameterName(DbParameter parameter);

        /// <summary>Creates uniqe name for a collection.</summary>
        /// <param name="originalParameterName">Parameter name before it was made unique.</param>
        /// <param name="parameterIndexInCollection">index of parameter in ParameterCollection.</param>
        /// <returns>Unique parameter name.</returns>
        string GetUniqueName(string originalParameterName, int parameterIndexInCollection);
    }
}